package com.example.demo.service.impl;

import com.example.demo.dao.UserMapper;
import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: xxx
 * @time: 2020-06-03 15:40
 * @author: baojinlong
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int addUser(String name, String age) {
        return userMapper.addUser(name, age);
    }

    @Override
    public User findById(String id) {
        return userMapper.findById(id);
    }

    @Override
    public void updateById(String id, String name) {
        userMapper.updataById(id, name);
    }

    @Override
    public void deleteById(String id) {
        userMapper.deleteById(id);
    }
}
